package test_achieve.web;

import constant.Constant;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * Created by lenovo on 2018/5/18.
 */
public class Qiye {

    @Given("^w进入企业版主页面$")
    public void w进入企业版主页面() throws Throwable {
        Constant.driverWeb.get("http://es.ss.bingex.com/#/login?_k=vnz21e");
    }

    @Given("^w进入企业版密码登陆页面$")
    public void w进入企业版密码登陆页面() throws Throwable {
        WebElement button= Constant.driverWeb.findElement(By.xpath("//*[@id=\"company-app\"]/div/div/div[2]/div/div[2]/div/div/div/div[1]/div/div/div/div/div[3]"));
        System.out.println("这个按钮的值是："+button.getText());
        button.click();
    }

//    @Given("^w输入企业账户账户：(.*)：(.*)$")
//    public void w输入企业账户账户(String name,String password) throws Throwable {
//        Constant.driverWeb.findElement(By.id("error")).sendKeys(name);
//        System.out.println(password);
//        Constant.driverWeb.findElement(By.id("password")).sendKeys(password);
//    }
}
